package example.pattern.observer;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		NumberGenerator ng = new NumberGenerator();
		Observer o1 = new DigitObserver();
		Observer o2 = new GraphObserver();
		ng.addObserver(o1);
		ng.addObserver(o2);
		for(int i=0;i<10;i++){
			System.out.println(ng.generateNumber());
			System.out.println();
		}
	}

}
